package com.wx.entity;

import java.util.LinkedHashMap;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;

/**
 * @User: Jrxsr
 * Menu
 * on 2019/1/2.
 **/
public class Menu {
    private List<button> button;

    public List<Menu.button> getButton() {
        return button;
    }

    public void setButton(List<Menu.button> button) {
        this.button = button;
    }

    /**
    @Override
    public String toString() {
        return "{\"button\":["+button+"]}";
    }
     */


    public class button {
        private String type;
        private String name;
        private String key;
        private String url;
        private List<sub_button> sub_button;
        /**
        @Override
        public String toString() { //key==null?"":"\"key\":\""+key+"\""+
            return "{\"name\":\""+name+"\""+(type==null?"":",\"type\":\""+type+"\"")+(key==null?"":",\"key\":\""+key+"\"")+",\"sub_button\":["+sub_button+"]}";
            //return "{type="+type+",name="+name+",key="+key+",sub_button"+sub_button.toString()+"}";
        }
        */
        public String getType() {
            return type;
        }

        public void setType(String type) {
            this.type = type;
        }

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public String getKey() {
            return key;
        }

        public void setKey(String key) {
            this.key = key;
        }

        public List<sub_button> getSub_button() {
            return sub_button;
        }

        public void setSub_button(List<Menu.sub_button> sub_button) {
            this.sub_button = sub_button;
        }
        public String getUrl() {
            return url;
        }

        public void setUrl(String url) {
            this.url = url;
        }
    }
    public class sub_button {
        private String type;
        private String name;
        private String url;
        private String key;
        /*
        @Override
        public String toString() {

            return "{\"type\":\""+type+"\",\"name\":\""+name+"\""+(url==null?"":",\"url\":\""+url+"\"")+(key==null?"":",\"key\":\""+key+"\"")+"}";
        }
        */
        public String getType() {
            return type;
        }

        public void setType(String type) {
            this.type = type;
        }

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public String getUrl() {
            return url;
        }

        public void setUrl(String url) {
            this.url = url;
        }

        public String getKey() {
            return key;
        }

        public void setKey(String key) {
            this.key = key;
        }
    }
}


